package org.example.model.messagequeue;

import lombok.Data;

import java.util.List;

/**
 * @author huangy
 * @description 房间信息
 * @since 2022/11/10 14:55
 **/
@Data
public class Room {

    private long id;

    private long code;

    private String name;

    private int type;

    private List<User> players;

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("{");
        for (User player : players) {
            sb.append(player);
        }
        sb.append("}");
        return "Room{" +
                "id=" + id +
                ", code=" + code +
                ", name='" + name + '\'' +
                ", type=" + type +
                ", players=" + sb.toString() +
                '}';
    }
}
